import { axios } from '@/utils/request'

// postAction
export function postAction (url, parameter) {
    return axios({
        url: url,
        method: 'post',
        data: parameter
    })
}

// putAction
export function putAction (url, parameter) {
    return axios({
        url: url,
        method: 'put',
        data: parameter
    })
}

// getAction
export function getAction (url, parameter) {
    return axios({
        url: url,
        method: 'get',
        params: parameter
    })
}

// deleteAction
export function deleteAction (url, parameter) {
    return axios({
        url: url,
        method: 'delete',
        data: parameter
    })
}

// downloadAction
export function downloadAction (url, parameter) {
    return axios({
        url: url,
        method: 'get',
        params: parameter,
        responseType: 'blob'
    })
}
